﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="CRM.Web.AppointmentReminderManage.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnSearch">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
        <tr>
            <td class="left">
                <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
            </td>
            <td class="middle">
                <div class="pagetitle">
                    <div>
                        <asp:Label ID="lblTitle" runat="server">预约提醒列表</asp:Label></div>
                </div>
            </td>
            <td class="right">
                <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
            </td>
        </tr>
    </table>
    <div id="divMain">
        <div style="width: 100%">
            <div class="listdiv">
                <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                    <tr>
                    
                        <td class="title">
                            <div class="nowrap">
                                预约状态:</div>
                        </td>
                        <td class="content">
                            <asp:DropDownList ID="ddlSTATUS" runat="server" CssClass="ddl">
                            </asp:DropDownList>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                预约类型:</div>
                        </td>
                        <td class="content">
                            <asp:DropDownList ID="ddlAPPOINTMENTTYPE" runat="server" CssClass="ddl">
                            </asp:DropDownList>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                预约时间:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtAPPOINTMENTTIMEBegin" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>-<asp:TextBox
                                ID="txtAPPOINTMENTTIMEEnd" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>
                        </td>
                        <td class="title">
                            <div class="nowrap">
                                创建时间:</div>
                        </td>
                        <td class="content">
                            <asp:TextBox ID="txtCREATETIMEBegin" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>-<asp:TextBox
                                ID="txtCREATETIMEEnd" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>
                        </td>
                        <td class="title" style="width: auto;">
                            &nbsp;
                        </td>
                        <td class="content">
                            <div style="width: 100px;" class="nowrap">
                                <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                                    OnClick="btnSearch_Click" /></div>
                        </td>
                    </tr>
                </table>
                <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                    OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting"
                    AllowPaging="True" AllowSorting="True" SortExpressionValue="REMINDERTIME" 
                    SortDirectionValue="DESC" onrowcommand="gvList_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="编号" SortExpression="APPOINTMENTREMINDERID">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlModifyAPPOINTMENTREMINDERID" runat="server" NavigateUrl='<%# Eval("APPOINTMENTURL") %>' Text='<%# Bind("APPOINTMENTREMINDERID") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="预约主题" SortExpression="APPOINTMENTSUBJECT">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlModifyAPPOINTMENTSUBJECT" runat="server" NavigateUrl='<%# Eval("APPOINTMENTURL") %>' Text='<%# Bind("APPOINTMENTSUBJECT") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="APPOINTMENTCONTENT" HeaderText="预约内容" SortExpression="APPOINTMENTCONTENT" />
                        <asp:BoundField DataField="APPOINTMENTTIME" HeaderText="预约时间" SortExpression="APPOINTMENTTIME" DataFormatString="{0:yyyy-MM-dd HH:mm}" />
                        <asp:BoundField DataField="STATUS" HeaderText="预约状态" SortExpression="STATUS" />
                        <asp:BoundField DataField="APPOINTMENTTYPE" HeaderText="预约类型" SortExpression="APPOINTMENTTYPE" />
                        <asp:BoundField DataField="APPOINTMENTPHONE" HeaderText="预约电话号码" SortExpression="APPOINTMENTPHONE" Visible="false"  />
                        <asp:BoundField DataField="REMINDERTIME" HeaderText="提醒时间" SortExpression="REMINDERTIME"  DataFormatString="{0:yyyy-MM-dd HH:mm}"  Visible="false" />
                        <asp:BoundField DataField="APPOINTMENTKEY" HeaderText="预约内容" SortExpression="APPOINTMENTKEY"  Visible="false" />
                        <asp:BoundField DataField="APPOINTMENTURL" HeaderText="链接地址" SortExpression="APPOINTMENTURL"  Visible="false" />
                        <asp:BoundField DataField="TIMEOUT" HeaderText="超时时间" SortExpression="TIMEOUT"  Visible="false" />
                        <asp:BoundField DataField="COMPLETIONTIME" HeaderText="完成时间" SortExpression="COMPLETIONTIME" Visible="false"  />
                        <asp:BoundField DataField="REMARK" HeaderText="备注" SortExpression="REMARK"  Visible="false" />
                        <asp:BoundField DataField="CREATETIME" HeaderText="创建时间" SortExpression="CREATETIME" />
                        <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号" SortExpression="CREATEPEOPLEID"  Visible="false" />
                        <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人" SortExpression="CREATEPEOPLE" />
                        <asp:BoundField DataField="BUSINESSDIVISIONID" HeaderText="事业部编号" SortExpression="BUSINESSDIVISIONID"  Visible="false" />
                        <asp:BoundField DataField="BUSINESSDIVISIONNAME" HeaderText="事业部名称" SortExpression="BUSINESSDIVISIONNAME"  Visible="false" />
                        <asp:BoundField DataField="BUSINESSDIVISIONCODE" HeaderText="事业部代码" SortExpression="BUSINESSDIVISIONCODE"  Visible="false" />
                        <asp:BoundField DataField="CASEID" HeaderText="工单编号" SortExpression="CASEID"  Visible="false" />
                        <asp:BoundField DataField="CUSTOMERID" HeaderText="客户编号" SortExpression="CUSTOMERID" Visible="false" />
                        <asp:BoundField DataField="TASKID" HeaderText="任务编号" SortExpression="TASKID" Visible="false"  />
                        <asp:TemplateField HeaderText="操作" ShowHeader="False">
                            <ItemTemplate>
                                <div style="white-space: nowrap;">
                                    <asp:HyperLink ID="hlModify" runat="server" NavigateUrl='<%# Eval("APPOINTMENTREMINDERID", ModifyUrl) %>'>详细</asp:HyperLink>                                    
                                    <asp:LinkButton ID="lbtnComplete" runat="server" Text="完成" CommandName="Complete" CausesValidation="False" CommandArgument='<%# Eval("APPOINTMENTREMINDERID") %>' ></asp:LinkButton>
                                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False"
                                        OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle CssClass="row" />
                    <AlternatingRowStyle CssClass="row2" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                </dp:WebGridView>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
